<?php




/**
* Delete an entity in [ albumsizes ]
* Our policy is to reset the is_active flag to N (no) to mean a deletion.
* A record is NOT deleted physically.
*/

# If you do not allow the delete feature, just enable the below line.
# stopper::url('albumsizes-list.php');

$albumsizes = new albumsizes();
$relationship_id = $variable->get('id', 'integer', 0);
$code = $variable->get('code', 'string', '');

# Assumes, ID always, in the GET parameter
if($relationship_id && $code)
{
	if($albumsizes->delete('inactivate', $relationship_id, $code))
	{
		$messenger = new messenger('warning', 'The record has been deleted.');

		# stopper::url('albumsizes-delete-successful.php');
		# headers::back('albumsizes-list.php');
		stopper::url('albumsizes-list.php');
	}
	else
	{
		$messenger = new messenger('error', 'The record has NOT been deleted.');

		stopper::url('albumsizes-delete-error.php?context=permissions');
	}
}
else
{
	stopper::url('albumsizes-direct-access-error.php?context=delete');
}
?>